package com.lqq.sparrow.consumer;

import com.lqq.sparrow.invoke.provider.RemoteService;
import com.lqq.sparrow.test.provider.api.HelloWorldService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liangqq
 */
@RestController
@Slf4j
public class HelloWorldConsumer {

    //@RemoteService
    @Autowired
    private HelloWorldService helloWorldService;


    @GetMapping("/hello-world")
    public String helloWorld(@RequestParam String param){
        log.info("consumer接收参数:{}", param);
        return helloWorldService.helloWorld(param);
    }

}
